Havish M Consulting
Customer Case Study · Sales & Marketing · Business Intelligence
Oil and Gas × Havish M Consulting

From a folder of sales files to next year's number

The oil and gas company's sales data sat in dozens of files, separate product and sales-group lists, and spreadsheets that each counted the year differently. HMC stitched it into one Power BI model with a fiscal-year calendar, DAX measures and a forecast that sales leaders could read and question.

ClientOil and Gas FunctionSales & Marketing ThemeSales Forecasting & BI
Sales files consolidated per refresh
0files
plus product and sales-group masters
Monthly reporting effort
−0%
▼ from about 26 hours to 4
Year definitions in use
0fiscal calendar
▼ from several spreadsheet versions
Forecast horizon in the dashboard
0quarters
▲ with confidence bands

Figures indicative; validated metrics available on request.

The Challenge

Lots of sales data, no single view of it

Every sales office sent its own file. Product names, sales groups and offices were kept in separate lists. Before anyone could ask "how are we tracking against last year?", someone had to spend days building the table to answer it.

Scattered data

Product, sales-code and numerous sales files sat in a folder, each in its own shape.

No central analytics

Without one model, insight was hard to get and decisions leaned on whichever spreadsheet was closest.

April, not January

The oil and gas company's year runs April to March. Calendar-year dates in reports put quarters and weeks in the wrong buckets.

Manual, every month

Copying, cleaning and recalculating consumed time and resources that should have gone into growth.

HMC Approach

Model once, refresh forever

Built with the oil and gas company's sales analytics team, on Power BI and the files they already received.

Select a step to see what happened.

Discover · Map the files

We listed every file, master and spreadsheet that fed sales reporting.

  • Monthly sales files by office, with product codes and sales-group codes.
  • Separate product and sales-group masters.
  • Several local definitions of quarter and week.

Deliverable: Source inventory and data dictionary.

Design · A star schema

One fact table, three dimensions, one direction of filtering.

  • Fact: date, company, product, sales district, office, SG, state, sales.
  • Dim_Product, Dim_SGCode and a Calendar table.
  • Fiscal year starting in April; weeks starting on Monday.

Deliverable: Data model and measure list.

Build · Power Query, DAX, forecast

Three layers, each with one job.

  • Power Query appends every file in the folder and joins the masters.
  • A DAX calendar with fiscal month, quarter, week and year labels.
  • Measures for YoY, FYTD and trend, plus a forecast with confidence bands.

Deliverable: Power BI model and Forecast dashboard.

Adopt · Refresh, then read

New files go into the folder; the dashboard refreshes.

  • Sales leaders filter by date range and case origin.
  • Forecasts reviewed in the monthly business review.
  • Calendar parameters documented for future changes.

Deliverable: Refresh routine and user walkthrough.

Scale · Same model, more questions

The model became the base for more reports.

  • New dimensions plug into the same star.
  • Calendar reused across other Power BI reports.
  • Forecast extended to product and region level.

Deliverable: Reusable model template.

The Solution

Consolidate, calendarise, forecast

The original screens first, then three working replicas on synthetic data: the Power Query model build, the fiscal calendar, and the forecast studio.

01 · The original screens

Forecast page, data model and calendar DAX

Shown as delivered. Click any screen to enlarge it.

Power BI forecast page showing sum of sales by year and quarter with a trend line, forecast and confidence band, plus Open Date and Case Origin slicers
The Forecast page. Sum of sales by year and quarter from 2019, a dashed trend line, a forecast to 2025 with a grey confidence band, and slicers for Open Date and Case Origin (Smart line, eSeva, Social Media, CEP, NCH, Vigilance, Email, Sales Buddy, Web).
Star schema with Fact table linked to Dim_Product, Dim_SGCode and Calendar
The data model. A Fact table (company, date, product, sales district, office, SG, state) with one-to-many links from Dim_Product, Dim_SGCode and Calendar.
DAX code for a fiscal calendar table with resulting columns
The calendar DAX. Inputs WeekStartsOn = "Mon" and FiscalStartMonth = 4; columns for MIndex, FiscalMIndex, CalMonth, CalQtr, CalYear, Fiscal Week, Fiscal Qtr, Fiscal Year, CalWeekNo, Weekend/Working, Day and CustomDate.
02 · Model builder

Watch the folder become a star schema

Press Refresh. Power Query reads every sales file in the folder, appends them, joins the product and sales-group masters, and loads the fact table. Click any table to peek at its rows.

0Files read
0Fact rows
0%Codes matched

Applied steps

  1. Folder.Files → filter .xlsx
  2. Invoke Transform File on each
  3. Append all sales files
  4. Merge Dim_Product on Product Code
  5. Merge Dim_SGCode on Sales Office
  6. Set types · remove blanks
  7. Load Fact · relate to Calendar
Click a table in the diagram
03 · Fiscal calendar lab

The DAX calendar, live

Change the two inputs from the original DAX. The ring, the month grid and the calendar rows recompute with the same logic: fiscal month index, fiscal quarter, fiscal week and fiscal-year label.

—

Fiscal Q1Q2Q3Q4Left column = Fiscal Week
04 · Forecast studio

Shape the forecast, see the uncertainty

A replica of the Forecast page on synthetic quarterly sales shaped like the original. Filter by product and region, change the horizon and confidence, hold back the last quarters to test accuracy, and drag the cut-off line.

Actual salesTrendForecastConfidence bandBack-test (held-out actuals)

Product

Sales region

Forecast length12 quarters
Confidence interval95%
Hold back (back-test)0 quarters

Model: additive Holt-Winters (exponential smoothing with trend and seasonality), the same family Power BI's analytics-pane forecast uses.

Synthetic data for illustration. Shape follows the original chart (about ₹0.4M per quarter in 2019 rising to about ₹1.5M by late 2022).

Impact Dashboard

Days of assembly became a refresh

The sales team stopped building the report and started reading it, with a forecast they could check against what actually happened.

Monthly reporting cycle

Hours by task, before vs after

Forecast error by product

Mean absolute % error vs a 10% target

Error (MAPE)10% targetGood / fair / poor bands

Figures indicative; validated metrics available on request.

Before vs After

How sales reporting works now

DimensionBeforeAfter
Data sourcesMany sales files, separate mastersOne folder, appended and joined by Power Query
CalendarCalendar-year dates, local quarter logicOne DAX calendar: April start, Monday weeks
AnalysisStatic pivots, rebuilt monthlyDAX measures: YoY, FYTD, trend
ForecastA straight line drawn in ExcelSeasonal forecast with confidence bands
RefreshAbout 3 days a monthDrop files, refresh, review
DecisionsBased on whichever sheet was latestBased on one model everyone shares
Tools & Tech Used

The Power BI stack, end to end

Power Query folder append and master joins Power BI data model star schema DAX fiscal calendar and measures Power BI forecasting trend and seasonal forecast Slicers & date ranges self-serve filtering
Key Takeaways

What any sales team can borrow

01

Point at the folder, not the file

A query that reads the whole folder never needs editing when next month's file arrives.

02

Own your calendar

A parameterised fiscal calendar puts every week and quarter in the bucket the business actually uses.

03

Show the band, not just the line

A forecast with its uncertainty, back-tested against real quarters, earns trust that a single line never does.